import http from '@/utils/http';
import request from '@/utils/request';

export async function configurationList(body) {
  return http.post('/ticketRule/getTicketRuleByPage', body);
}

export async function configurationAdd(body) {
  return http.post('/ticketRule/addTsTicketRule', body);
}

export async function configurationEdit(body) {
  return http.post('/ticketRule/editTsTicketRule', body);
}

export async function configurationDetail(body) {
  return http.get('/ticketRule/getTicketRuleVoById', body);
}

export async function configurationDelete(body) {
  return http.get('/ticketRule/deleteTicketRule', body);
}

export async function configurationBaseEdit(body) {
  return http.post('/tsTicketStrategy/editTicketStrategy', body);
}

export async function configurationBaseDetail(body) {
  return http.get('/tsTicketStrategy/getTicketStrategy', body);
}

export async function workOrderProcessingList(body) {
  return http.post('/ticket/getTicketByPage', body);
}

export async function workOrderAllocate(body) {
  return http.post('/ticket/assignTicket', body);
}

export async function workOrderTransfer(body) {
  return http.post('/ticket/transferTicket', body);
}

export async function workOrderDetail(body) {
  return http.get('/ticket/getTicketById', body);
}

export async function workOrderTimeLine(body) {
  return http.post('/ticket/getProcessList', body);
}

export async function workOrderReplay(body) {
  return http.uploadFile('/ticket/processApply', body);
}

export async function workOrderSolutionDuration(body) {
  return http.post('/ticket/updateTicket', body);
}

export async function WorkOrderStatisticsBaseInfo(body) {
  return http.post('/ticket/staticsByTime', body);
}

export async function WorkOrderStatisticsList(body) {
  return http.post('/ticket/getTicketStaticsByPage', body);
}

export async function workOrderClose(body) {
  return http.post('/ticket/closeTicket', body);
}

export async function configurationStatusEdit(body) {
  return http.post('/ticketRule/editRuleStatus', body);
}

export async function businessConfigs(body) {
  return http.get('/ticket/getAllBusinessConfig', body);
}

export async function businessConfigUpdate(body) {
  return http.post('/ticket/updateTicket', body);
}

export async function businessExtraAdd(body) {
  return http.post('/ticket/addBusinessExtra', body);
}

export async function workOrderTimeList(body) {
  return http.get('/ticket/getTicketTimeList', body);
}

export async function workOrderExport(body) {
  return http.downloadFileForPost('/ticket/exportTicket', body);
}

export async function workOrderUnReadNum(body) {
  return http.get('/ticket/getUnReplyTicket', body);
}

export async function exportTicketStaticsByCondition(params) {
  return http.downloadFileForPost("/ticket/exportTicketStaticsByCondition", params)
}
